Skip to content

chore: Add PR review reminder workflow#20175

Open
Copilot wants to merge 6 commits intodevelopfrom
copilot/add-review-reminder-workflow
Open

chore: Add PR review reminder workflow#20175
Copilot wants to merge 6 commits intodevelopfrom
copilot/add-review-reminder-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 9, 2026

Adds .github/workflows/pr-review-reminder.yml and scripts/pr-review-reminder.mjs.

  • Schedule: weekdays 10:00 UTC; also workflow_dispatch.
  • Skips draft PRs and PRs opened by Bot users.
  • Only GitHub pending requested reviewers (users/teams not yet reviewed).
  • Fires when ≥2 full elapsed business days (UTC) since last review_requested or last reminder for that login/team; weekends excluded; US/CA/AT holidays via Nager.Date (fallback: weekdays only if API fails).
  • One issue comment per PR; per-reviewer HTML markers; dedup using prior github-actions[bot] comments.
  • Individual @mentions: omit repo outside collaborators (listCollaborators affiliation: outside); on API failure, skip individuals (warn), teams unchanged.
  • Team @mentions: only pending team slug team-javascript-sdks.
  • Warn if pending reviewer/team has no matching review_requested timeline event.
  • Job skipped on workflow_dispatch for forks; schedule always runs on default branch.
  • GITHUB_TOKEN permissions: contents: read, issues: write, pull-requests: read.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Core

  • Add enableTruncation option to OpenAI integration by andreiborza in #20167
  • Export a reusable function to add tracing headers by JPeer264 in #20076

Other

  • (deps) Bump defu from 6.1.4 to 6.1.6 by dependabot in #20104

Internal Changes 🔧

  • (size-limit) Bump failing size limit scenario by Lms24 in #20186
  • Add PR review reminder workflow by Copilot in #20175

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 25.72 kB +0.31% +77 B 🔺
@sentry/browser - with treeshaking flags 24.21 kB +0.34% +82 B 🔺
@sentry/browser (incl. Tracing) 42.73 kB +1.36% +573 B 🔺
@sentry/browser (incl. Tracing, Profiling) 47.35 kB +1.25% +583 B 🔺
@sentry/browser (incl. Tracing, Replay) 81.54 kB +0.75% +600 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 71.11 kB +0.78% +549 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 86.25 kB +0.7% +594 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 98.45 kB +0.56% +541 B 🔺
@sentry/browser (incl. Feedback) 42.51 kB +0.21% +87 B 🔺
@sentry/browser (incl. sendFeedback) 30.39 kB +0.27% +80 B 🔺
@sentry/browser (incl. FeedbackAsync) 35.38 kB +0.24% +82 B 🔺
@sentry/browser (incl. Metrics) 27.04 kB +0.31% +83 B 🔺
@sentry/browser (incl. Logs) 27.18 kB +0.3% +81 B 🔺
@sentry/browser (incl. Metrics & Logs) 27.86 kB +0.29% +80 B 🔺
@sentry/react 27.48 kB +0.26% +71 B 🔺
@sentry/react (incl. Tracing) 45.05 kB +1.28% +566 B 🔺
@sentry/vue 30.56 kB +1.61% +483 B 🔺
@sentry/vue (incl. Tracing) 44.59 kB +1.23% +538 B 🔺
@sentry/svelte 25.74 kB +0.31% +77 B 🔺
CDN Bundle 28.41 kB +0.3% +83 B 🔺
CDN Bundle (incl. Tracing) 43.75 kB +1.46% +628 B 🔺
CDN Bundle (incl. Logs, Metrics) 29.78 kB +0.31% +92 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) 44.83 kB +1.5% +660 B 🔺
CDN Bundle (incl. Replay, Logs, Metrics) 68.59 kB +0.16% +103 B 🔺
CDN Bundle (incl. Tracing, Replay) 80.64 kB +0.78% +621 B 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 81.66 kB +0.75% +604 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 86.17 kB +0.72% +615 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 87.2 kB +0.71% +610 B 🔺
CDN Bundle - uncompressed 82.99 kB +0.34% +279 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 129.77 kB +1.5% +1.92 kB 🔺
CDN Bundle (incl. Logs, Metrics) - uncompressed 87.14 kB +0.33% +279 B 🔺
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 133.19 kB +1.46% +1.92 kB 🔺
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 210.12 kB +0.14% +279 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 246.65 kB +0.79% +1.92 kB 🔺
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 250.05 kB +0.78% +1.92 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 259.56 kB +0.75% +1.92 kB 🔺
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 262.95 kB +0.74% +1.92 kB 🔺
@sentry/nextjs (client) 47.47 kB +1.24% +579 B 🔺
@sentry/sveltekit (client) 43.2 kB +1.36% +577 B 🔺
@sentry/node-core 57.86 kB +3.78% +2.1 kB 🔺
@sentry/node 174.83 kB +1.42% +2.43 kB 🔺
@sentry/node - without tracing 97.97 kB +2.02% +1.94 kB 🔺
@sentry/aws-serverless 115.22 kB +2.11% +2.38 kB 🔺

View base workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,730 - 14,229 -39%
GET With Sentry 1,710 20% 2,638 -35%
GET With Sentry (error only) 5,906 68% 9,829 -40%
POST Baseline 1,159 - 1,627 -29%
POST With Sentry 574 50% 855 -33%
POST With Sentry (error only) 1,025 88% 1,425 -28%
MYSQL Baseline 3,147 - 4,517 -30%
MYSQL With Sentry 413 13% 548 -25%
MYSQL With Sentry (error only) 2,541 81% 3,802 -33%

View base workflow run

Filter individual @mentions via outside-collaborator list (no read:org PAT).
Tighten GITHUB_TOKEN permissions; skip workflow_dispatch on forks; warn on
timeline mismatches.

Co-Authored-By: Claude <noreply@anthropic.com>
Made-with: Cursor
@Lms24 Lms24 marked this pull request as ready for review April 10, 2026 09:48
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 91d8c62. Configure here.


const pendingReviewers = requested.reviewers; // individual users
const pendingTeams = requested.teams; // team reviewers
if (pendingReviewers.length === 0 && pendingTeams.length === 0) continue;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong property name crashes script for all PRs

High Severity

The GitHub REST API response from pulls.listRequestedReviewers returns individual reviewers under the users property, not reviewers. Accessing requested.reviewers yields undefined, so pendingReviewers.length on the next line throws a TypeError, crashing the entire script for every PR that reaches this point.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 91d8c62. Configure here.

Comment on lines +177 to +179
const pendingReviewers = requested.reviewers; // individual users
const pendingTeams = requested.teams; // team reviewers
if (pendingReviewers.length === 0 && pendingTeams.length === 0) continue;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The code accesses requested.reviewers to get pending reviewers, but the GitHub API response object contains a users field instead, causing a crash.
Severity: CRITICAL

Suggested Fix

On line 177, change the property access from requested.reviewers to requested.users. The line should be const pendingReviewers = requested.users;.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: scripts/pr-review-reminder.mjs#L177-L179

Potential issue: The `github.rest.pulls.listRequestedReviewers()` method returns an
object with `users` and `teams` fields, as per the GitHub API documentation. The code
incorrectly attempts to access `requested.reviewers` on line 177, which results in the
`pendingReviewers` variable being `undefined`. Subsequently, line 179 attempts to access
`pendingReviewers.length`, which will throw a `TypeError`. This will cause the workflow
to crash for any pull request that has pending individual reviewers, which is a primary
use case for this script.

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants